<template>
  <div class="choiceApprover">
    <group>
      <cell v-for="(item,index) in list" @click.native="item.checked = !item.checked" value-align="left" :key="index"
            value="value">
        <icon solt="icon" class="checked" type="success-circle" v-if="item.checked"></icon>
        <icon solt="icon" class="unchecked" type="success-circle" v-else="item.checked"></icon>
        <img style="margin-left: 10px" width="40" height="40px" src="~assets/images3/user_defualt.jpg" alt="">
        <span style="margin-left: 20px" solt="title">{{item.nickName}}</span>
      </cell>
    </group>
    <!--<flexbox>-->
      <!--<flexbox-item>-->
        <!--<x-button type="warn" @click.native="hidePopup(false)">取消</x-button>-->
      <!--</flexbox-item>-->
      <!--<flexbox-item>-->
        <!--<x-button type="primary" @click.native="hidePopup(true)">确定</x-button>-->
      <!--</flexbox-item>-->
    <!--</flexbox>-->
  </div>
</template>

<script>
  import {Group, Cell, XButton, Flexbox, FlexboxItem, Icon} from 'vux'

  export default {
    name: "choiceApprover",
    components: {
      Group, Cell, XButton, Flexbox, FlexboxItem, Icon
    },
    props: {
      list: Array
    },
    methods: {
      hidePopup(_is) {
        if(_is){
          this.$emit('addApproval');
        }else{
          this.$emit('addApproval',this.list);
        }
      }
    },
    data() {
      return {
      }
    },
    mounted() {
    },
    created() {

    }
  }
</script>

<style lang="less">
  .choiceApprover {
    .weui-cells {
      margin-top: 0;
      background: #f4f4f4;
      .weui-cell {
        background: #ffffff;
        margin-top: 5px;
        .checked {
          color: #43A2FE
        }
        .unchecked {
          color: #999999;
        }
      }
    }
    .vux-flexbox {
      position: absolute;
      bottom: 0;
      .vux-flexbox-item {
        margin-left: 0 !important;
        border-radius: 0%;
        .weui-btn_primary {
          background: #43A2FE;
        }
        .weui-btn_warn {
          background: #E05163;
        }
        .weui-btn {
          border-radius: 0;
        }
      }
    }
  }


</style>
